FROM jenkins/jenkins:2.332.1-lts-alpine

ADD jenkins_home /var/jenkins_home
USER root
RUN chown -R jenkins:jenkins /var/jenkins_home
# ADD jenkins.metrics.api.MetricsAccessKey.xml /var/jenkins_home/

# http://10.200.14.142:8080/metrics/currentUser/metrics?pretty=true

# RUN sed -i '$a <Location /server-status>' /usr/local/apache2/conf/httpd.conf \
#   && sed -i '$a SetHandler server-status' /usr/local/apache2/conf/httpd.conf \
#   && sed -i '$a Order Deny,Allow' /usr/local/apache2/conf/httpd.conf \
#   && sed -i '$a Deny from all' /usr/local/apache2/conf/httpd.conf \
#   && sed -i '$a Allow from 10.100.65.119' /usr/local/apache2/conf/httpd.conf \
#   && sed -i '$a </Location>' /usr/local/apache2/conf/httpd.conf
